package com.aircjm.datatype;

public class StaticTest {

    public static void main(String[] args) {

        TestStatic testStatic1 = new TestStatic();
        TestStatic testStatic2 = new TestStatic();

        System.out.println(testStatic1.id);
        System.out.println(testStatic2.id);
        System.out.println("------------------------------------------");

        testStatic1.id++;

        System.out.println(testStatic1.id);
        System.out.println(testStatic2.id);
        System.out.println("------------------------------------------");

        testStatic1.setId(50);

        System.out.println(testStatic1.id);
        System.out.println(testStatic2.id);
        System.out.println("------------------------------------------");

        testStatic1.id++;

        System.out.println(testStatic1.id);
        System.out.println(testStatic2.id);
        System.out.println("------------------------------------------");
    }

}

class TestStatic {
    public static int id = 20;

    private int number;

    public static int getId() {
        return id;
    }

    public static void setId(int id) {
        TestStatic.id = id;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
}
